package krt.wid.gslzs.adpater;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.ArrayList;
import java.util.List;

import krt.wid.gslzs.R;
import krt.wid.gslzs.bean.AppealBean;
import krt.wid.gslzs.bean.NewBean;

/**
 * Created by admin on 2018/5/11.
 * 诉求类型Dialog
 */

public class AppealAdpater extends BaseQuickAdapter<AppealBean.DataBean,BaseViewHolder>{
    private List<AppealBean.DataBean> mlist= new ArrayList<>();


    public AppealAdpater(@Nullable List<AppealBean.DataBean> data) {
        super(R.layout.item_appeal, data);
        this.mlist=data;
    }

    @Override
    protected void convert(final BaseViewHolder helper, final AppealBean.DataBean item) {
        String name= item.getName();
        helper.setText(R.id.tv_name, item.getName()); //名称

        boolean isCheck=mlist.get(helper.getPosition()).isCheck();
        if (isCheck){
            helper.setTextColor(R.id.tv_name,mContext.getResources().getColor(R.color.color_1b9ef6) );
        }else {
            helper.setTextColor(R.id.tv_name,mContext.getResources().getColor(R.color.black) );
        }

    }
}
